import axios from "axios";

const requestMock = axios.create({
  baseURL: "/mock-api",
});

requestMock.interceptors.request.use(
  (config) => {
    return config;
  },
  (err) => {
    return Promise.reject(err);
  }
);

requestMock.interceptors.response.use(
  (response) => {
    return response.data;
  },
  (err) => {
    return Promise.reject(err);
  }
);

export default requestMock;
